package com.gomore.opple.module.addaddress;


import com.gomore.opple.BasePresenter;
import com.gomore.opple.BaseView;
import com.gomore.opple.web.cgform.consumer.entity.TOConsumerEntity;
import com.gomore.opple.web.cgform.shippingaddr.entity.TOShippingAddrEntity;

public interface AddAddressContract {

    interface View extends BaseView<Presenter> {

        /**
         * 显示进度条
         */
        void showProgressDialog();

        /**
         * 隐藏进度条
         */
        void hideProgressDialog();

        /**
         * 展示消息
         *
         * @param msg 消息
         */
        void showMessage(String msg);

        /**
         * 展示消息
         *
         * @param msgId 消息id
         */
        void showMessage(int msgId);

        /**
         * 返回提交订单界面
         */
        void backToAccount();

    }

    interface Presenter extends BasePresenter {

        /**
         * 准备初始化数据
         */
        void prepareInitData();

        /**
         * 保存地址
         *
         * @param toShippingAddrEntity
         */
        void saveAddress(TOShippingAddrEntity toShippingAddrEntity);

        /**
         * 修改保存地址
         *
         * @param toShippingAddrEntity
         */
        void updateAddress(TOShippingAddrEntity toShippingAddrEntity);

        /**
         * 删除地址
         *
         * @param uuid
         */
        void removeAddress(String uuid);

        /**
         * 获取客户
         *
         * @return
         */
        TOConsumerEntity getConsumer();
    }
}
